package com.gopay.common.cps.manager.entrust.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.gopay.common.cps.dao.entrust.CpsDSContractInfoQueryDAO;
import com.gopay.common.cps.manager.entrust.FullCpsDSContractQueryManager;
import com.gopay.common.domain.entrust.EntrustContractInfo;

/**
 * @FullCpsDSContractQueryManagerImpl.java
 * @author zhuliang
 * @2016-12-27 下午1:49:37  www.gopay.com.cn Inc.All rights reserved.
 */
@Service("fullCpsDSContractQueryManager")
public class FullCpsDSContractQueryManagerImpl implements FullCpsDSContractQueryManager {

    @Resource(name = "cpsDSContractInfoQueryDAO")
    private CpsDSContractInfoQueryDAO cpsDSContractInfoQueryDAO;

    @Override
    public EntrustContractInfo get(Serializable id) {
        // TODO Auto-generated method stub

    	EntrustContractInfo contractInfo = cpsDSContractInfoQueryDAO.find(EntrustContractInfo.class, Long.valueOf((String)id).longValue());
            if(null != contractInfo){
                return contractInfo;
            }

        return null;
    }

    /**
     * 根据协议号获取合约信息
     * 
     * @param contractNo
     * @return
     */
    @Override
    public EntrustContractInfo getByContractNo(String contractNo){
        return cpsDSContractInfoQueryDAO.getByContractNo(contractNo);
    }

	@Override
	public List<EntrustContractInfo> get(Map<Object, Object> paraMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<EntrustContractInfo> getAll() {
		// TODO Auto-generated method stub
		return null;
	}
    

}
